<template>
<div id="goodsList">
<div class="goods" v-for ="item in goods" :key =item.img>
<router-link :to='"/goods/goodsxiangqing/"+item.id'>
<img :src=item.img>
<p class="goodsTitle">{{item.title}}</p>
<p class="price">{{item.price}}</p>
</router-link>
</div>
</div>
</template>
<script>
import mui from '../mui.min.js'  
export default{
	name:'goods',
	data(){
	return({
		goods:[]
	})
	},
	created(){
		this.$http.get("http://127.0.0.1:5000/taobao").then(response =>this.goods = response.data)
	}
}
</script>
<style>
img{
	width:100%;
}
#goodsList{
	display:flex;
	flex-wrap:wrap;
	flex-direction:row;
	justify-content:space-between;
	margin:6px;
}
.goods{
	display:block-inline;
	width:49%;

}
.price{
	color:red;
}
.goodsTitle{
	display:-webkit-box;
	-webkit-line-clamp:2;
	-webkit-box-orient:vertical;
}
</style>